//Page 333
#include <algorithm>
#include <cstddef>
#include <fstream>
#include <iterator>
#include <iostream>

using namespace std;

bool gt15 (int x) { return 15 < x; }

int main()
{
	ofstream ints("someInts.dat");
	ints << "1 3 47 5 84 9";
	ints.close();
	
	ifstream inf("someInts.dat");
	
	remove_copy_if ( istream_iterator<int>(inf),
					 istream_iterator<int>(),
					 ostream_iterator<int>(cout, "\n"),
					 gt15);

	return 0 ;
}
